package com.dream.service.impl;

import com.dream.dao.MajorDao;
import com.dream.dao.impl.MajorDaoImpl;
import com.dream.pojo.Major;
import com.dream.service.MajorService;

import java.util.List;

public class MajorServiceImpl implements MajorService {

    MajorDao majorDao=new MajorDaoImpl();

    @Override
    public List<Major> findMajorsByDepartId(String departId) {
        return majorDao.findMajorsByDepartId(departId);
    }

    @Override
    public long totalCount(String majorName) {
        return majorDao.totalCount(majorName);
    }

    @Override
    public List<Major> list(String majorName, long pageIndex, long pageSize) {
        return majorDao.list(majorName,pageIndex,pageSize);
    }


    @Override
    public int add(Major major) {
        return majorDao.add(major);
    }

    @Override
    public Major findById(String majorId) {
        return majorDao.findById(majorId);
    }

    @Override
    public int update(Major major) {
        return majorDao.update(major);
    }

    @Override
    public int deleteById(String majorId) {
        return majorDao.deleteById(majorId);
    }
}
